home *** CD-ROM | disk | FTP | other *** search
Wrap
XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) NNNNAAAAMMMMEEEE XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg - Data type for a compound string parse mapping SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS #include <Xm/Xm.h> VVVVEEEERRRRSSSSIIIIOOOONNNN This page documents Motif 2.1. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg is an opaque data type for a parse mapping used by XXXXmmmmSSSSttttrrrriiiinnnnggggPPPPaaaarrrrsssseeeeTTTTeeeexxxxtttt to create a compound string. A parse mapping contains a pattern to be matched in text being parsed to create a compound string. It also contains a compound string, or a function to be invoked to provide a compound string, to be included in the compound string being created whenever the pattern is matched. An application uses a resource-style interface to specify components for an XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg. XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggCCCCrrrreeeeaaaatttteeee creates a parse mapping, using a resource-style argument list. XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggGGGGeeeettttVVVVaaaalllluuuueeeessss and XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggSSSSeeeettttVVVVaaaalllluuuueeeessss retrieve and set the components of a parse mapping. XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggFFFFrrrreeeeeeee recovers memory used by a parse mapping. XXXXmmmmPPPPaaaarrrrsssseeeeTTTTaaaabbbblllleeee is an array of XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg objects. The XXXXmmmmNNNNiiiinnnnvvvvooookkkkeeeePPPPaaaarrrrsssseeeePPPPrrrroooocccc resource is a function of type XXXXmmmmPPPPaaaarrrrsssseeeePPPPrrrroooocccc, which is defined as follows: XmIncludeStatus (*XmParseProc) (_t_e_x_t__i_n__o_u_t, _t_e_x_t__e_n_d, _t_y_p_e, _t_a_g, _e_n_t_r_y, _p_a_t_t_e_r_n__l_e_n_g_t_h, _s_t_r__i_n_c_l_u_d_e, _c_a_l_l__d_a_t_a) XtPointer *_t_e_x_t__i_n__o_u_t; XtPointer _t_e_x_t__e_n_d; XmTextType _t_y_p_e; XmStringTag _t_a_g; XmParseMapping _e_n_t_r_y; int _p_a_t_t_e_r_n__l_e_n_g_t_h; XmString *_s_t_r__i_n_c_l_u_d_e; XtPointer _c_a_l_l__d_a_t_a; A parse procedure provides an escape mechanism for arbitrarily complex parsing. This procedure is invoked when a pattern in the input text is matched with a pattern in a parse mapping whose XXXXmmmmNNNNiiiinnnncccclllluuuuddddeeeeSSSSttttaaaattttuuuussss is XXXXmmmmIIIINNNNVVVVOOOOKKKKEEEE. The input text is a pointer to the first byte of the pattern that was matched to trigger the call to the parse procedure. The parse procedure consumes as many bytes of the input string as it needs and sets the input text pointer to the following byte. It returns a compound string to be included in the compound string being constructed, and it also Page 1 (printed 10/3/02) XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) returns an XXXXmmmmIIIInnnncccclllluuuuddddeeeeSSSSttttaaaattttuuuussss indicating how the returned compound string should be handled. If the parse procedure does not set the input text pointer ahead by at least one byte, the parsing routine continues trying to match the input text with the patterns in the remaining parse mappings in the parse table. Otherwise, the parsing routine begins with the new input text pointer and tries to match the input text with patterns in the parse mappings starting at the beginning of the parse table. _t_e_x_t__i_n__o_u_t Specifies the text being parsed. The value is a pointer to the first byte of text matching the pattern that triggered the call to the parse procedure. When the parse procedure returns, this argument is set to the position in the text where parsing should resume-that is, to the byte following the last character parsed by the parse procedure. _t_e_x_t__e_n_d Specifies a pointer to the end of the _t_e_x_t__i_n__o_u_t string. If _t_e_x_t__e_n_d is NULL, the string is scanned until a NULL character is found. Otherwise, the string is scanned up to but not including the character whose address is _t_e_x_t__e_n_d. _t_y_p_e Specifies the type of text and the tag type. If a locale tag should be created, _t_y_p_e has a value of either XXXXmmmmMMMMUUUULLLLTTTTIIIIBBBBYYYYTTTTEEEE____TTTTEEEEXXXXTTTT or XXXXmmmmWWWWIIIIDDDDEEEECCCCHHHHAAAARRRR____TTTTEEEEXXXXTTTT. If a charset should be created, _t_y_p_e has a value of XXXXmmmmCCCCHHHHAAAARRRRSSSSEEEETTTT____TTTTEEEEXXXXTTTT. _t_a_g Specifies the tag to be used in creating the result. The type of string tag created (charset or locale) depends on the text type and the passed in _t_a_g value. If the _t_a_g value is NULL and if _t_y_p_e indicates that a charset string tag should be created, the string tag has the value that is the result of mapping XXXXmmmmSSSSTTTTRRRRIIIINNNNGGGG____DDDDEEEEFFFFAAAAUUUULLLLTTTT____CCCCHHHHAAAARRRRSSSSEEEETTTT. If _t_y_p_e indicates a locale string tag, the string tag has the value ____MMMMOOOOTTTTIIIIFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____LLLLOOOOCCCCAAAALLLLEEEE. _e_n_t_r_y Specifies the parse mapping that triggered the call to the parse procedure. _p_a_t_t_e_r_n__l_e_n_g_t_h Specifies the number of bytes in the input text, following _t_e_x_t__i_n__o_u_t, that constitute the matched pattern. _s_t_r__i_n_c_l_u_d_e Specifies a pointer to a compound string. The Page 2 (printed 10/3/02) XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) parse procedure creates a compound string to be included in the compound string being constructed. The parse procedure then returns the compound string in this argument. _c_a_l_l__d_a_t_a Specifies data passed by the application to the parsing routine. The parse procedure returns an XXXXmmmmIIIInnnncccclllluuuuddddeeeeSSSSttttaaaattttuuuussss indicating how _s_t_r__i_n_c_l_u_d_e is to be included in the compound string being constructed. Following are the possible values: XXXXmmmmIIIINNNNSSSSEEEERRRRTTTT Concatenate the result to the compound string being constructed and continue parsing. XXXXmmmmTTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE Concatenate the result to the compound string being constructed and terminate parsing. NNNNeeeewwww RRRReeeessssoooouuuurrrrcccceeeessss The following table defines a set of resources used by the programmer to specify data. The codes in the access column indicate if the given resource can be set at creation time (C), set by using XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggSSSSeeeettttVVVVaaaalllluuuueeeessss (S), retrieved by using XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggGGGGeeeettttVVVVaaaalllluuuueeeessss (G), or is not applicable (N/A). XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg RRRReeeessssoooouuuurrrrcccceeee SSSSeeeetttt NNNNaaaammmmeeee CCCCllllaaaassssssss TTTTyyyyppppeeee DDDDeeeeffffaaaauuuulllltttt AAAAcccccccceeeessssssss XmNclientData XtPointer NULL CSG XmNincludeStatus XmIncludeStatus XmINSERT CSG XmNinvokeParseProc XmParseProc NULL CSG XmNpattern XtPointer NULL CSG XmNpatternType XmTextType XmCHARSET_TEXT CSG XmNsubstitute XmString NULL CSG XXXXmmmmNNNNcccclllliiiieeeennnnttttDDDDaaaattttaaaa Specifies data to be used by the parse procedure. XXXXmmmmNNNNiiiinnnncccclllluuuuddddeeeeSSSSttttaaaattttuuuussss Specifies how the result of the mapping is to be included in the compound string being constructed. Unless the value is XXXXmmmmIIIINNNNVVVVOOOOKKKKEEEE, the result of the mapping is the value of XXXXmmmmNNNNssssuuuubbbbssssttttiiiittttuuuutttteeee. Following are the possible values for XXXXmmmmNNNNiiiinnnncccclllluuuuddddeeeeSSSSttttaaaattttuuuussss: XXXXmmmmIIIINNNNSSSSEEEERRRRTTTT Concatenate the result to the compound string being constructed and continue parsing. XXXXmmmmIIIINNNNVVVVOOOOKKKKEEEE Invoke the XXXXmmmmNNNNiiiinnnnvvvvooookkkkeeeePPPPaaaarrrrsssseeeePPPPrrrroooocccc on the text being parsed and use the returned Page 3 (printed 10/3/02) XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnngggg((((3333XXXX)))) compound string instead of XXXXmmmmNNNNssssuuuubbbbssssttttiiiittttuuuutttteeee as the result to be inserted into the compound string being constructed. The include status returned by the parse procedure (XXXXmmmmIIIINNNNSSSSEEEERRRRTTTT or XXXXmmmmTTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE) determines how the returned compound string is included. XXXXmmmmTTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE Concatenate the result to the compound string being constructed and terminate parsing. XXXXmmmmNNNNiiiinnnnvvvvooookkkkeeeePPPPaaaarrrrsssseeeePPPPrrrroooocccc Specifies the parse procedure to be invoked when XXXXmmmmNNNNiiiinnnncccclllluuuuddddeeeeSSSSttttaaaattttuuuussssis XXXXmmmmIIIINNNNVVVVOOOOKKKKEEEE. XXXXmmmmNNNNppppaaaatttttttteeeerrrrnnnn Specifies a pattern to be matched in the text being parsed. This is a maximum of one character. XXXXmmmmNNNNppppaaaatttttttteeeerrrrnnnnTTTTyyyyppppeeee Specifies the type of the pattern that is the value of XXXXmmmmNNNNppppaaaatttttttteeeerrrrnnnn. Following are the possible values: +o XXXXmmmmCCCCHHHHAAAARRRRSSSSEEEETTTT____TTTTEEEEXXXXTTTT +o XXXXmmmmMMMMUUUULLLLTTTTIIIIBBBBYYYYTTTTEEEE____TTTTEEEEXXXXTTTT +o XXXXmmmmWWWWIIIIDDDDEEEECCCCHHHHAAAARRRR____TTTTEEEEXXXXTTTT XXXXmmmmNNNNssssuuuubbbbssssttttiiiittttuuuutttteeee Specifies the compound string to be included in the compound string being constructed when XXXXmmmmNNNNiiiinnnncccclllluuuuddddeeeeSSSSttttaaaattttuuuussss is XXXXmmmmIIIINNNNSSSSEEEERRRRTTTT or XXXXmmmmTTTTEEEERRRRMMMMIIIINNNNAAAATTTTEEEE. RRRREEEELLLLAAAATTTTEEEEDDDD XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggCCCCrrrreeeeaaaatttteeee(3), XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggFFFFrrrreeeeeeee(3), XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggGGGGeeeettttVVVVaaaalllluuuueeeessss(3), XXXXmmmmPPPPaaaarrrrsssseeeeMMMMaaaappppppppiiiinnnnggggSSSSeeeettttVVVVaaaalllluuuueeeessss(3), XXXXmmmmPPPPaaaarrrrsssseeeeTTTTaaaabbbblllleeee(3), and XXXXmmmmSSSSttttrrrriiiinnnngggg(3). Page 4 (printed 10/3/02)